package com.cloud.bean;

import java.util.Arrays;
import java.util.Objects;

public class Bean {
    protected Integer num;
    protected String s;
    protected Object[] elements;

    public Bean(Integer num, String s, Object[] elements) {
        this.num = num;
        this.s = s;
        this.elements = elements;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getS() {
        return s;
    }

    public void setS(String s) {
        this.s = s;
    }

    public Object[] getElements() {
        return elements;
    }

    public void setElements(Object[] elements) {
        this.elements = elements;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Bean bean = (Bean) o;
        return Objects.equals(num, bean.num) && Objects.equals(s, bean.s) && Arrays.equals(elements, bean.elements);
    }

    @Override
    public int hashCode() {
        int result = Objects.hash(num, s);
        result = 31 * result + Arrays.hashCode(elements);
        return result;
    }
}
